package com.woniu.server.feign;

import com.woniu.common.utils.ResponseData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author hht
 * @Date Create by 2024/11/26 11:41
 */
@FeignClient(name = "work-server", path = "/work")
public interface WorkFeign {

    @GetMapping("/deployFlow")
    ResponseData<String> deployFlow(@RequestParam("bpmnFile") String bpmnFile);

    @GetMapping("/startProcess")
    ResponseData<String> startProcess(@RequestParam("deploymentId") String deploymentId);

    @GetMapping("/completeTask")
    void completeTask(@RequestParam("processInstanceId") String processInstanceId,
                             @RequestParam("approvalResult") Integer approvalResult,
                             @RequestParam("roleName") String roleName);
}
